grid functions - continued

XgrConvertWindowToDisplay ( grid, xWin, yWin, @xDisp, @yDisp )

XgrConvertWindowToDisplay() converts window coordinates (xWin,yWin) to display coordinates (xDisp,yDisp) for the window that contains grid .

XgrConvertWindowToGrid ( grid, xWin, yWin, @xGrid, @yGrid )

XgrConvertWindowToGrid() converts window coordinates (xWin,yWin) to (xGrid,yGrid) grid coordinates for grid . 

XgrConvertWindowToLocal ( grid, xWin, yWin, @x, @y )

XgrConvertWindowToGrid() converts window coordinates (xWin,yWin) to (x,y) local coordinates for grid . 

XgrConvertWindowToScaled ( grid, xWin, yWin, @x#, @y# )

XgrConvertWindowToScaled() converts window coordinates (xWin,yWin) into (x#,y#) scaled coordinates for grid . 

XgrCreateGrid (@grid, gridType, x, y, width, height, window, parent, func )

XgrCreateGrid() creates a new grid in window, returns its grid number, initializes its settings to default values, then initializes its (gridType,parent,func) settings.

The upper-left corner of grid is set to:

(x,y) Local Coordinates of parent grid/window (locates grid-box)
(0,0) Local Coordinates
(0,0) Grid Coordinates 
(0#,0#) Scaled Coordinates

while the lower-right corner of grid is set to:

(width-1, height-1) Local Coordinates
(width-1, height-1) Grid Coordinates
(1#, 1#) Scaled Coordinates

XgrDestroyGrid ( grid )

XgrDestroyGrid() destroys grid, and make the grid number available. If grid is bufferGrid in other grids, bufferGrid is set to 0 in those grids. If grid is an image grid type, its memory image is freed.

XgrGetGridBorder ( grid, @border, @borderUp, @borderDown, @borderFlags )

XgrGetGridBorder() returns the current grid border attribute that specifies the border style in the XgrDrawBorder() functions, plus additional border values borderUp , borderDown , borderFlags .

XgrGetGridBorderOffset ( grid, @left, @top, @right, @bottom )

XgrGetGridBorderOffset() returns the current border offset from the left , top , right , and bottom of grid that controls where the border is drawn by the XgrDrawBorder() functions.

XgrGetGridBoxDisplay ( grid, @x1Disp, @y1Disp, @x2Disp, @y2Disp )

XgrGetGridBox() returns the display coordinates of the upper-left and lower-right corners of the grid-box for grid in (x1Disp,y1Disp:x2Disp,y2Disp) . 

XgrGetGridBoxGrid ( grid, @x1Grid, @y1Grid, @x2Grid, @y2Grid )

XgrGetGridBoxGrid() returns the grid coordinates of the upper-left and lower-right corners of the grid-box for grid in (x1Grid,y1Grid:x2Grid,y2Grid) . 

XgrGetGridBoxLocal ( grid, @x1, @y1, @x2, @y2 )

XgrGetGridBoxLocal() returns local coordinates of the upper-left and lower-right corners of the grid-box for grid in (x1,y1:x2,y2) . 

XgrGetGridBoxScaled ( grid, x1#, y1#, x2#, y2# )

XgrGetGridBoxScaled() returns the scaled coordinates of the upper-left and lower-right corners of the grid-box for grid in (x1#,y1#:x2#,y2#) . 

XgrGetGridBoxWindow ( grid, @x1Win, @y1Win, @x2Win, @y2Win )

XgrGetGridBoxWindow() returns the window coordinates of the upper-left and lower-right corners of the grid-box for grid in (x1Win,y1Win:x2Win,y2Win) . 

XgrGetGridBuffer ( grid, @bufferGrid )

XgrGetGridBuffer() returns in bufferGrid the image grid that is currently performing automatic buffering for grid . bufferGrid=0 if automatic buffering is not being performed. 

XgrGetGridCharacterMapArray ( grid, @map[] )

XgrGetGridCharacterMapArray() returns a copy of the character map array for the specified grid .

XgrGetGridCoords ( grid, @x, @y, @x1, @y1, @x2, @y2 )

XgrGetGridCoords() returns parents local coordinates of the upper-left corner of grid in x,y, and the local coordinates of the (upper-left:lower-right) corners of grid in (x1,y1:x2,y2) .

XgrGetGridDrawingMode ( grid, @drawingMode, @lineStyle, @lineWidth )

XgrGetDrawingMode() returns the current drawingMode for grid, including (lineStyle,lineWidth) . 

0 in drawingMode means SET drawing mode, where pixels are drawn with the specified color. 1 means XOR drawing mode, where pixels are drawn with the color generated by a bitwise XOR of the current pixel color and the specified color.

lineWidth, lineStyle may not be implemented.

XgrGetGridFont ( grid, @font )

XgrGetGridFont() returns the font currently assigned to grid . font determines the typeface, character size, and drawing angle for text drawn in grid .

XgrGetGridFunction ( grid, @func )

XgrGetGridFunction() returns the func address of the grid function currently assigned to grid . This is the function called by XgrProcessMessages() when it processes grid messages for grid .

XgrGetGridParent ( grid, @parent )

XgrGetGridParent() returns the parent currently assigned to grid . Grids with parent=0 have no parent. Parentless grids are the only grids whose grid functions are called and sent Redraw messages by XgrRedrawWindow() .

XgrGetGridPositionAndSize ( grid, @x, @y, @width, @height )

XgrGetGridPositionAndSize() returns the local coordinates in its parent of the upper-left corner of the grid-box of grid in (x,y), and the width and height of the grid-box in (width,height) . 

XgrGetGridState ( grid, @state )

XgrGetGridState() returns the state currently assigned to grid . state=0 disables grid . 

GraphicsDesigner does not consider disabled grids in its search to find the grid to send mouse messages to, which effectively makes disabled grids invisible or non-existent to the mouse.

XgrGetGridType ( grid, @gridType )

XgrGetGridType() returns the gridType of grid . 

XgrGetGridWindow ( grid, @window )

XgrGetGridWindow() returns the window that contains grid .